﻿@page "/mud/cookie-policy"
@using BytexDigital.Blazor.Components.CookieConsent

<DocsPage DisplayFooter="true">
    <DocsPageHeader Title="Cookie policy" SubTitle="" />
    <DocsPageContent>
        
        <DocsPageSection>
            <SectionHeader Title="Insights into MudBlazor's Cookie Utilization">
                <Description>
                    This Cookie Policy explains how MudBlazor ("we", "us", or "our") uses cookies and similar technologies on our website <MudLink Href="https://mudblazor.com/" Target="_blank">MudBlazor</MudLink>. By using the Service, you consent to the use of cookies and similar technologies as described in this policy.
                </Description>
            </SectionHeader>
            
            
            <DocsPageSection>
                <SectionHeader Title="What are cookies?">
                    <Description>
                        Cookies are small pieces of text sent by your web browser by a website you visit. A cookie file is stored in your web browser and allows the Service or a third-party to recognize you and make your next visit easier and the Service more useful to you.
                        <br />
                        Cookies can be "persistent" or "session" cookies. Persistent cookies remain on your personal computer or mobile device when you go offline, while session cookies are deleted as soon as you close your web browser.
                    </Description>
                </SectionHeader>
            </DocsPageSection>
            
            <DocsPageSection>
                <SectionHeader Title="How MudBlazor uses cookies?">
                    <Description>
                        When you use and access the Service, we may place a number of cookies files in your web browser.
                        <br />
                        <br />
                        We use cookies for the following purposes:
                        <div class="d-flex flex-column px-2">
                            <MudBadge Class="mt-1" Color="Color.Primary" Dot="true" Origin="Origin.CenterLeft">
                                <div class="pl-4 docs-line-height-normal">
                                    To enable certain functions of the Service
                                </div>
                            </MudBadge>
                            <MudBadge Class="mt-1" Color="Color.Primary" Dot="true" Origin="Origin.CenterLeft">
                                <div class="pl-4 docs-line-height-normal">
                                    To provide analytics
                                </div>
                            </MudBadge>
                            <MudBadge Class="mt-1" Color="Color.Primary" Dot="true" Origin="Origin.CenterLeft">
                                <div class="pl-4 docs-line-height-normal">
                                    To store your preferences
                                </div>
                            </MudBadge>
                            <MudBadge Class="mt-1" Color="Color.Primary" Dot="true" Origin="Origin.CenterLeft">
                                <div class="pl-4 docs-line-height-normal">
                                    To enable advertisements delivery, including behavioral advertising
                                </div>
                            </MudBadge>
                        </div>
                        <br />
                        We use both session and persistent cookies on the Service and we use different types of cookies to run the Service:
                        <br />
                        Essential cookies. We may use essential cookies to authenticate users and prevent fraudulent use of user accounts.
                        Third-party cookies. In addition to our own cookies, we may also use various third-parties cookies to report usage statistics of the Service, deliver advertisements on and through the Service, and so on.
                    </Description>
                </SectionHeader>
            </DocsPageSection>
            
            <DocsPageSection>
                <SectionHeader Title="Use of cookies on MudBlazor’s Website">
                    <Description>
                        The table below explains the cookies we use and why.
                        <br />
                        <MudSimpleTable Style="overflow-x: auto;">
                            <thead>
                            <tr>
                                <th><strong>Cookie</strong></th>
                                <th><strong>Purpose</strong></th>
                                <th><strong>Expiry time</strong></th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>ARRAffinity / ARRAffinitySameSite &nbsp;</td>
                                <td>
                                    This cookie is set by websites run on the Windows Azure cloud platform. It is used for load balancing to make sure the visitor page requests are routed to the same server in any browsing session.
                                    <em><MudLink Href="https://cookiepedia.co.uk/cookies/ARRAffinity" Target="_blank">Read Cookiepedia’s overview of this cookie here</MudLink></em>
                                </td>
                                <td>When your session ends</td>
                            </tr>
                            <tr>
                                <td>Google Analytics _ga</td>
                                <td rowspan="3">
                                    These Google Analytics cookies are used to collect information about how visitors use our website. We use the information to compile reports and to help us improve the website. The cookies collect information in a way
                                    that does not directly identify anyone, including the number of visitors to the website, where visitors have come to the website from and the pages they visited.
                                    <MudLink Href="https://support.google.com/analytics/answer/6004245" Target="_blank">Read Google’s overview of privacy and safeguarding data</MudLink>
                                </td>
                                <td>2 years</td>
                            </tr>
                            <tr>
                                <td>Google Analytics _ga_PRYNCB61NV</td>
                                <td>1 minute</td>
                            </tr>
                            </tbody>
                        </MudSimpleTable>
                    </Description>
                </SectionHeader>
            </DocsPageSection>
            <DocsPageSection>
                <SectionHeader Title="What are your choices regarding cookies?">
                    <Description>
                        If you'd like to delete cookies or instruct your web browser to delete or refuse cookies, please visit the help pages of your web browser.
                        <br />
                        Please note, however, that if you delete cookies or refuse to accept them, you might not be able to use all of the features we offer, you may not be able to store your preferences, and some of our pages might not display properly.
                    </Description>
                </SectionHeader>
            </DocsPageSection>
            
            <DocsPageSection>
                <SectionHeader Title="Where can you find more information about cookies?">
                    <Description>
                        You can learn more about cookies and the following third-party websites:
                        <br />
                        <br />
                        All About Cookies: <MudLink Href="https://allaboutcookies.org" Target="_blank">allaboutcookies.org</MudLink>
                        <br />
                        Network Advertising Initiative: <MudLink Href="https://thenai.org" Target="_blank">thenai.org</MudLink>
                        <br />
                        <br />
                        Contact Us
                        <br />
                        If you have any questions about this Cookie Policy, please contact us by visiting the following link: <MudLink Href="https://github.com/MudBlazor/MudBlazor/issues" Target="_blank">MudBlazor GitHub page</MudLink>
                    </Description>
                </SectionHeader>
            </DocsPageSection>
            <DocsPageSection>
                <SectionHeader Title="How do I change my cookie settings?">
                    <Description>
                        You can change your cookie preferences at any time by clicking the "Cookie Preferences" button below.
                        <br />
                        <br />
                        <MudButton OnClick="OpenSettingsAsync" DropShadow="false" EndIcon="@Icons.Material.Filled.Cookie" Variant="Variant.Filled" Color="Color.Primary" Class="docs-no-text-transform">Cookie Preferences</MudButton>
                        <br />
                        <br />
                        You may need to refresh your page for your settings to take effect. If you have an ad blocker you may have trouble seeing it.
                        <br />
                        <br />
                        Alternatively, most web browsers allow some control of most cookies through the browser settings. To find out more about cookies, including how to see what cookies have been set, visit <MudLink Href="https://www.aboutcookies.org" Target="_blank">www.aboutcookies.org</MudLink> or <MudLink Href="https://allaboutcookies.org" Target="_blank">allaboutcookies.org</MudLink>.
                        <br />
                        <br />
                        Find out how to manage cookies on popular browsers:
                        <div class="d-flex flex-column px-2">
                            <MudBadge Class="mt-1" Color="Color.Primary" Dot="true" Origin="Origin.CenterLeft">
                                <div class="pl-4 docs-line-height-normal">
                                    <MudLink Href="https://support.google.com/accounts/answer/61416?co=GENIE.Platform%3DDesktop&hl=en" Target="_blank">Google Chrome</MudLink>
                                </div>
                            </MudBadge>
                            <MudBadge Class="mt-1" Color="Color.Primary" Dot="true" Origin="Origin.CenterLeft">
                                <div class="pl-4 docs-line-height-normal">
                                    <MudLink Href="https://support.microsoft.com/windows/microsoft-edge-browsing-data-and-privacy-bb8174ba-9d73-dcf2-9b4a-c582b4e640dd" Target="_blank">Microsoft Edge</MudLink>
                                </div>
                            </MudBadge>
                            <MudBadge Class="mt-1" Color="Color.Primary" Dot="true" Origin="Origin.CenterLeft">
                                <div class="pl-4 docs-line-height-normal">
                                    <MudLink Href="https://support.mozilla.org/kb/enhanced-tracking-protection-firefox-desktop?redirectslug=enable-and-disable-cookies-website-preferences" Target="_blank">Mozilla Firefox</MudLink>
                                </div>
                            </MudBadge>
                            <MudBadge Class="mt-1" Color="Color.Primary" Dot="true" Origin="Origin.CenterLeft">
                                <div class="pl-4 docs-line-height-normal">
                                    <MudLink Href="https://support.microsoft.com/windows/delete-and-manage-cookies-168dab11-0753-043d-7c16-ede5947fc64d" Target="_blank">Microsoft Internet Explorer</MudLink>
                                </div>
                            </MudBadge>
                            <MudBadge Class="mt-1" Color="Color.Primary" Dot="true" Origin="Origin.CenterLeft">
                                <div class="pl-4 docs-line-height-normal">
                                    <MudLink Href="https://help.opera.com/latest/web-preferences/" Target="_blank">Opera</MudLink>
                                </div>
                            </MudBadge>
                            <MudBadge Class="mt-1" Color="Color.Primary" Dot="true" Origin="Origin.CenterLeft">
                                <div class="pl-4 docs-line-height-normal">
                                    <MudLink Href="https://support.apple.com/safari" Target="_blank">Apple Safari</MudLink>
                                </div>
                            </MudBadge>
                        </div>
                        <br />
                        To find information relating to other browsers, visit the browser developer’s website.
                        <br />
                        <br />
                        To opt-out of being tracked by Google Analytics across all websites, visit <MudLink Href="http://tools.google.com/dlpage/gaoptout" Target="_blank">http://tools.google.com/dlpage/gaoptout</MudLink>.
                    </Description>
                </SectionHeader>
            </DocsPageSection>
        </DocsPageSection>
    </DocsPageContent>
</DocsPage>

@code
{
#nullable enable
    [Inject]
    protected CookieConsentService CookieConsentService { get; set; } = null!;

    private Task OpenSettingsAsync()
    {
        return CookieConsentService.ShowConsentModalAsync(false);
    }
}